#ifndef ITEM_HPP_INCLUDED
#define ITEM_HPP_INCLUDED

#include <list>

#include "GameObject.hpp"
#include "ItemProperties.hpp"
#include "Material.hpp"

class Actor;
class Zone;

class Item: public GameObject
{
public:
	Item(Actor* owner = NULL, Zone* zone = NULL, char shape = '?', EObjectSize size = EOS_MINISCULE, std::string name = "unknown", bool transparent = true, 
		Vector2d position = Vector2d(0, 0), TCODColor fore = TCODColor::white, TCODColor back = TCODColor::black);
	virtual ~Item();

	virtual bool isProperty(EItemType type);

	virtual unsigned int getId();

	virtual Actor* getOwner();
	virtual ItemProperty* getProperty(EItemType type);
	virtual Zone* getZone();
	
	virtual void onBurn();
	virtual void onDrink();
	virtual void onDrop();
	virtual void onExamine();
	virtual void onGet();
	virtual void onLook();
	virtual void onRead();
	virtual void onUse();
	virtual void onWield();
	virtual void setId(unsigned int id);
	virtual void update();

	static Item* addItem(std::string name, Vector2d pos, Zone* area, Actor* owner = NULL);

protected:
	unsigned int Id, Mat;

	std::vector<ItemProperty*> Properties;

	Actor* Owner;
	
	Zone* Area;
};

#endif
